<?php

declare(strict_types=1);

namespace App\Models;

use Hyperf\Database\Model\SoftDeletes;

class CommodityActivity extends Base
{
    use SoftDeletes;

    /**
     * 上架状态
     */
    const STATUS_PUT_ON_SHELF = 1;

    /**
     * 下架状态
     */
    const STATUS_OFF_SHELF = 2;

    /**
     * 推送类型: 不推送
     */
    const PUSH_SETTING_DO_NOT = 1;

    /**
     * 推送类型: 立即推送
     */
    const PUSH_SETTING_NOW = 2;

    /**
     * 推送类型: 定时推送
     */
    const PUSH_SETTING_REGULARLY = 3;

    /**
     * 推送类型: 每日推送
     */
    const PUSH_SETTING_DAILY = 4;

    /**
     * 素材
     * @return \Hyperf\Database\Model\Relations\HasMany
     */
    public function materials()
    {
        return $this->hasMany(CommodityActivityPushMaterial::class);
    }
}
